Re: Re: Re: replacing HSQL internal DB with other db (e.g., MySQL) - simple list of steps

svjetlana <[email protected]> Tue, 06 Oct 2009 13:56:09 +0200
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1254830128-18930-7344
Content-Type: multipart/alternative;
 boundary="------------060002030705070500080601"

This is a multi-part message in MIME format.
--------------060002030705070500080601
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I've just try to run Shark as EJB (under jboss-4.0.2) and everything 
works good. I did the following steps:

EJB on JBoss  
 
  look at EJB folder
   -unpack jboss.zip in %JBOSS_HOME% dir
   -copy .ear and .xml files into /server/default/deploy directory
  - for MySQL db configuration copy mysql-connector-java-XX.jar to JBoss 
server/default/lib folder

 - edit SharkClient.conf file:  - ClientType=EJB 
                                - 
XaUserTransactionLookupName=UserTransaction
 - The JBOSS jar file jbossall-client.jar (located in JBOSS server's 
client directory)
    must be copied to <shark_install_dir>/lib/contrib directory.

   
 - run jboss from bin folder
 - runSA from %TWS_INSTALL% dir


Luke Rasmussen wrote:
> After going through those steps we were able to get an instance of 
> Shark running as POJO to use MySQL instead of HSQL.  It seems to have 
> been working well for us, and we have tried moving an instance of 
> Shark running as EJB (under JBoss) to also use MySQL instead of HSQL. 
>  
> Things look good initially after the configuration is done, however 
> when I try to load an XPDL using the Shark Admin client I get an 
> exception:
>
>     09:52:13,835 INFO  [Shark] PackageAdmin -> Trying to open Package
>     from provided byte[] content
>     09:52:14,908 ERROR [STDERR] java.lang.NullPointerException
>     09:52:14,910 ERROR [STDERR]     at
>     org.enhydra.shark.PackageAdmin.openPackage(PackageAdmin.java:751)
>     09:52:14,910 ERROR [STDERR]     at
>     org.enhydra.shark.PackageAdmin.uploadPackage(PackageAdmin.java:238)
>     09:52:14,910 ERROR [STDERR]     at
>     org.enhydra.shark.ws.PackageAdministrationWrapper.uploadPackage(PackageAdministrationWrapper.java:251)
>      (...Additional stack trace removed...)
>     09:52:14,915 ERROR [Shark] PackageAdmin -> Package byte[]
>     representation failed to open
>
> I realize this may not be enough information to troubleshoot 
> the issue, so please let me know what other logs or config files could 
> be helpful.  From what I could tell, the config files the system 
> was using all referenced the MySQL instance, and the MySQL 
> connectivity appears to be working since the configure script worked 
> correctly. 
>  
> I tried digging into the code,  and this looks like what's throwing 
> the exception:
>
>     Set currentPkgIds = * new *
>     HashSet(getRepositoryPersistenceManager().getExistingXPDLIds(shandle));
>
>
> I'm not sure why the repository persistence manager (DODS by default, 
> right?) wouldn't be getting created, unless there's additional 
> configuration I need to do to point DODS at the MySQL instance.  Could 
> there possibly be something with transferring byte[] to MySQL and the 
> version of MySQL being used?
>  
> Thanks in advance for any direction you can point me in.  I'll 
> continue to investigate in the meantime in case there's something 
> simple I've overlooked.
>  
> Luke R.
>
>  
>
> On Mon, Jul 27, 2009 at 5:33 PM, Dmitry Shulga 
> <[email protected] <mailto:[email protected]>> wrote:
>  
>
>     If I understood you right, you may find an answer in the very
>     first question in the Shark FAQ
>      
>     db_loader_job=hsql
>      
>     DS
>      
>      
>     On Mon, Jul 27, 2009 at 3:28 PM, Vojtech Huser
>     <[email protected] <mailto:[email protected]>> wrote:
>      
>
>         Dear members,
>          
>         we would like to replace the HSQL database with a more robust one
>         (e.g., MySQL, MS SQL or Oracle).
>         We tried few things but can not get all the errors go away.
>          
>         If you were able to switch to a different db, can you please
>         post a
>         ultra-short list of modifications/steps which are involved in such
>         switch?
>          
>         Vojtech Huser
>          
>          
>          
>
>     -- 
>     You receive this message as a subscriber of the [email protected]
>     <mailto:[email protected]> mailing list.
>     To unsubscribe: mailto:[email protected]
>     <mailto:[email protected]>
>     For general help: mailto:[email protected]
>     <mailto:[email protected]>?subject=help
>     OW2 mailing lists service home page: http://www.ow2.org/wws
>      
>      
>
>  
>  
> --
> You receive this message as a subscriber of the [email protected] 
> <mailto:[email protected]> mailing list.
> To unsubscribe: mailto:[email protected] 
> <mailto:[email protected]>
> For general help: mailto:[email protected] <mailto:[email protected]>?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>  
>  
>  
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [email protected] mailing list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>   


--------------060002030705070500080601
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I've just try to run Shark as EJB (under jboss-4.0.2) and everything
works good. I did the following steps: <br>
<br>
EJB on JBoss&nbsp;&nbsp; <br>
&nbsp; <br>
&nbsp; look at EJB folder<br>
&nbsp;&nbsp; -unpack jboss.zip in %JBOSS_HOME% dir<br>
&nbsp;&nbsp; -copy .ear and .xml files into /server/default/deploy directory<br>
&nbsp; - for MySQL db configuration copy mysql-connector-java-XX.jar to
JBoss server/default/lib folder<br>
<br>
&nbsp;- edit SharkClient.conf file:&nbsp; - ClientType=EJB&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
XaUserTransactionLookupName=UserTransaction<br>
&nbsp;- The JBOSS jar file jbossall-client.jar (located in JBOSS server's
client directory)<br>
&nbsp;&nbsp;&nbsp; must be copied to &lt;shark_install_dir&gt;/lib/contrib directory.<br>
<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;- run jboss from bin folder<br>
&nbsp;- runSA from %TWS_INSTALL% dir <br>
<br>
<br>
Luke Rasmussen wrote:
<blockquote
 cite="[email protected]"
 type="cite">
  <meta http-equiv="Context-Type"
 content="text/html; charset=ISO-8859-1">
  <div>After going through those steps we were able to get an instance
of Shark running as POJO to use MySQL instead of HSQL.&nbsp; It seems to
have been working well for us, and we have tried moving an instance of
Shark running as EJB (under JBoss) to also use MySQL instead of HSQL.&nbsp; </div>
  <div>&nbsp;</div>
  <div>Things look good initially after the configuration is done,
however when I try to load an XPDL using the Shark Admin client I get
an exception:</div>
  <blockquote>
    <div> 09:52:13,835 INFO&nbsp; [Shark] PackageAdmin -&gt; Trying to open
Package from provided byte[] content </div>
    <div>09:52:14,908 ERROR [STDERR] java.lang.NullPointerException</div>
    <div>09:52:14,910 ERROR [STDERR]&nbsp;&nbsp;&nbsp;&nbsp; at
org.enhydra.shark.PackageAdmin.openPackage(PackageAdmin.java:751)</div>
    <div>09:52:14,910 ERROR [STDERR]&nbsp;&nbsp;&nbsp;&nbsp; at
org.enhydra.shark.PackageAdmin.uploadPackage(PackageAdmin.java:238)</div>
    <div>09:52:14,910 ERROR [STDERR]&nbsp;&nbsp;&nbsp;&nbsp; at
org.enhydra.shark.ws.PackageAdministrationWrapper.uploadPackage(PackageAdministrationWrapper.java:251)</div>
    <div> &nbsp;(...Additional stack trace removed...) </div>
    <div> 09:52:14,915 ERROR [Shark] PackageAdmin -&gt; Package byte[]
representation failed to open </div>
  </blockquote>
  <div>I realize this&nbsp;may not be&nbsp;enough information to&nbsp;troubleshoot
the&nbsp;issue,&nbsp;so please let me know what other logs or config files could
be helpful.&nbsp; From what I could tell, the config files&nbsp;the system
was&nbsp;using all referenced the MySQL instance, and the MySQL connectivity
appears to be working since the configure script worked correctly.&nbsp; </div>
  <div>&nbsp;</div>
  <div>I tried digging into the code,&nbsp;&nbsp;and this looks like what's
throwing the exception:</div>
  <blockquote>
    <div> Set currentPkgIds = <b> new </b>
HashSet(getRepositoryPersistenceManager().getExistingXPDLIds(shandle));
    </div>
  </blockquote>
  <div>I'm not sure why the repository persistence manager (DODS by
default, right?) wouldn't be getting created, unless there's additional
configuration I need to do to point DODS at the MySQL instance.&nbsp; Could
there possibly be something with transferring byte[] to MySQL and the
version of MySQL being used?</div>
  <div>&nbsp;</div>
  <div>Thanks in advance for any direction you can point me in.&nbsp; I'll
continue to investigate in the meantime in case there's something
simple I've overlooked.</div>
  <div>&nbsp;</div>
  <div>Luke R.</div>
  <p> &nbsp; </p>
  <div>On Mon, Jul 27, 2009 at 5:33 PM, Dmitry Shulga <span>&lt;<a
 href="mailto:[email protected]">[email protected]</a>&gt;</span>
wrote:
  <div>&nbsp;</div>
  <blockquote>If I understood you right, you may find an answer in the
very first question in the Shark FAQ
    <div>&nbsp;</div>
    <div>db_loader_job=hsql</div>
    <div>&nbsp;</div>
    <div>DS</div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>
    <div>
    <div>
    <div>On Mon, Jul 27, 2009 at 3:28 PM, Vojtech Huser <span>&lt;<a
 href="mailto:[email protected]">[email protected]</a>&gt;</span>
wrote:
    <div>&nbsp;</div>
    </div>
    </div>
    <blockquote>
      <div>
      <div>Dear members,
      <div>&nbsp;</div>
      <div>we would like to replace the HSQL database with a more
robust one</div>
      <div>(e.g., MySQL, MS SQL or Oracle).</div>
      <div>We tried few things but can not get all the errors go away.</div>
      <div>&nbsp;</div>
      <div>If you were able to switch to a different db, can you please
post a</div>
      <div>ultra-short list of modifications/steps which are involved
in such</div>
      <div>switch?</div>
      <div> &nbsp; </div>
      <div>Vojtech Huser</div>
&nbsp;</div>
      <div>&nbsp;</div>
      <div>&nbsp;</div>
      </div>
    </blockquote>
    </div>
--
    <div>You receive this message as a subscriber of the <a
 href="mailto:[email protected]">[email protected]</a> mailing list.</div>
    <div>To unsubscribe: mailto:<a
 href="mailto:[email protected]">[email protected]</a></div>
    <div>For general help: mailto:<a href="mailto:[email protected]">[email protected]</a>?subject=help</div>
    <div>OW2 mailing lists service home page: <a
 href="http://www.ow2.org/wws">http://www.ow2.org/wws</a></div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>
  </blockquote>
  </div>
  <div>&nbsp;</div>
  <div>&nbsp;</div>
  <div>--</div>
  <div>You receive this message as a subscriber of the <a
 href="mailto:[email protected]">[email protected]</a> mailing list.</div>
  <div>To unsubscribe: mailto:<a href="mailto:[email protected]">[email protected]</a></div>
  <div>For general help: mailto:<a href="mailto:[email protected]">[email protected]</a>?subject=help</div>
  <div>OW2 mailing lists service home page: <a
 href="http://www.ow2.org/wws">http://www.ow2.org/wws</a></div>
  <div>&nbsp;</div>
  <div>&nbsp;</div>
  <div>&nbsp;</div>
  <pre wrap="">
<hr size="4" width="90%">

--
You receive this message as a subscriber of the <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> mailing list.
To unsubscribe: <a class="moz-txt-link-freetext" href="mailto:[email protected]">mailto:[email protected]</a>
For general help: <a class="moz-txt-link-freetext" href="mailto:[email protected]?subject=help">mailto:[email protected]?subject=help</a>
OW2 mailing lists service home page: <a class="moz-txt-link-freetext" href="http://www.ow2.org/wws">http://www.ow2.org/wws</a>
  </pre>
</blockquote>
<br>
</body>
</html>

--------------060002030705070500080601--

------------=_1254830128-18930-7344
Content-Type: text/plain; charset="UTF-8"; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: quoted-printable


--
You receive this message as a subscriber of the [email protected] mailing lis=
t.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=3Dhelp
OW2 mailing lists service home page: http://www.ow2.org/wws

------------=_1254830128-18930-7344--