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

Luke Rasmussen <[email protected]> Mon, 5 Oct 2009 12:33:54 -0500
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1254764036-18930-7268
Content-Type: multipart/alternative; boundary=00504502c8738c153a0475338432


--00504502c8738c153a0475338432
Content-Type: text/plain; charset=ISO-8859-1

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]>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]>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] 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
>>
>>
>>
>
>
> --
> 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
>
>
>

--00504502c8738c153a0475338432
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>After going through those steps we were able to get an instance of Sha=
rk running as POJO to use MySQL instead of HSQL.=A0 It seems to have been w=
orking well for us, and we have tried moving an instance of Shark running a=
s EJB (under JBoss) to also use MySQL instead of HSQL.=A0 </div>

<div>=A0</div>
<div>Things look good initially after the configuration is done, however wh=
en I try to load an XPDL using the Shark Admin client I get an exception:</=
div>
<blockquote dir=3D"ltr" style=3D"MARGIN-RIGHT: 0px">
<div><font face=3D"courier new,monospace">09:52:13,835 INFO=A0 [Shark] Pack=
ageAdmin -&gt; Trying to open Package from provided byte[] content</font></=
div>
<div>09:52:14,908 ERROR [STDERR] java.lang.NullPointerException</div>
<div>09:52:14,910 ERROR [STDERR]=A0=A0=A0=A0 at org.enhydra.shark.PackageAd=
min.openPackage(PackageAdmin.java:751)</div>
<div>09:52:14,910 ERROR [STDERR]=A0=A0=A0=A0 at org.enhydra.shark.PackageAd=
min.uploadPackage(PackageAdmin.java:238)</div>
<div>09:52:14,910 ERROR [STDERR]=A0=A0=A0=A0 at org.enhydra.shark.ws.Packag=
eAdministrationWrapper.uploadPackage(PackageAdministrationWrapper.java:251)=
</div>
<div><font face=3D"courier new,monospace">=A0(...Additional stack trace rem=
oved...)</font></div>
<div><font face=3D"courier new,monospace">09:52:14,915 ERROR [Shark] Packag=
eAdmin -&gt; Package byte[] representation failed to open</font></div></blo=
ckquote>
<div>I realize this=A0may not be=A0enough information to=A0troubleshoot the=
=A0issue,=A0so please let me know what other logs or config files could be =
helpful.=A0 From what I could tell, the config files=A0the system was=A0usi=
ng all referenced the MySQL instance, and the MySQL connectivity appears to=
 be working since the configure script worked correctly.=A0 </div>

<div>=A0</div>
<div>I tried digging into the code,=A0=A0and this looks like what&#39;s thr=
owing the exception:</div>
<blockquote dir=3D"ltr" style=3D"MARGIN-RIGHT: 0px">
<div><font face=3D"courier new,monospace"><font size=3D"2">Set currentPkgId=
s =3D </font><b><font color=3D"#7f0055" size=3D"2"><font color=3D"#7f0055" =
size=3D"2">new</font></font></b></font><font face=3D"courier new,monospace"=
 size=3D"2"> HashSet(getRepositoryPersistenceManager().getExistingXPDLIds(s=
handle));</font></div>
</blockquote>
<div>I&#39;m not sure why the repository persistence manager (DODS by defau=
lt, right?) wouldn&#39;t be getting created, unless there&#39;s additional =
configuration I need to do to point DODS at the MySQL instance.=A0 Could th=
ere possibly be something with transferring byte[] to MySQL and the version=
 of MySQL being used?</div>

<div>=A0</div>
<div>Thanks in advance for any direction you can point me in.=A0 I&#39;ll c=
ontinue to investigate in the meantime in case there&#39;s something simple=
 I&#39;ve overlooked.</div>
<div>=A0</div>
<div>Luke R.</div>
<p><font size=3D"2">=A0</font></p>
<div class=3D"gmail_quote">On Mon, Jul 27, 2009 at 5:33 PM, Dmitry Shulga <=
span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">dmitry.shul=
[email protected]</a>&gt;</span> wrote:=20
<div>=A0</div>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">If I understood you right, you m=
ay find an answer in the very first question in the Shark FAQ=20
<div>=A0</div>
<div>db_loader_job=3Dhsql</div>
<div>=A0</div>
<div>DS</div>
<div>=A0</div>
<div>=A0</div>
<div class=3D"gmail_quote">
<div>
<div></div>
<div class=3D"h5">On Mon, Jul 27, 2009 at 3:28 PM, Vojtech Huser <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">h=
[email protected]</a>&gt;</span> wrote:=20
<div>=A0</div></div></div>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0=
pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div class=3D"h5">Dear members,=20
<div>=A0</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>=A0</div>
<div>If you were able to switch to a different db, can you please post a</d=
iv>
<div>ultra-short list of modifications/steps which are involved in such</di=
v>
<div>switch?</div>
<div><font color=3D"#888888">=A0</font></div><font color=3D"#888888">
<div>Vojtech Huser</div>
<div></div></font>=A0</div>
<div>=A0</div>
<div>=A0</div></div></blockquote></div>--=20
<div>You receive this message as a subscriber of the <a href=3D"mailto:shar=
[email protected]" target=3D"_blank">[email protected]</a> mailing list.</div>
<div>To unsubscribe: mailto:<a href=3D"mailto:[email protected]" ta=
rget=3D"_blank">[email protected]</a></div>
<div>For general help: mailto:<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>?subject=3Dhelp</div>
<div>OW2 mailing lists service home page: <a href=3D"http://www.ow2.org/wws=
" target=3D"_blank">http://www.ow2.org/wws</a></div>
<div>=A0</div>
<div>=A0</div></blockquote></div>
<div>=A0</div>
<div>=A0</div>
<div>--</div>
<div>You receive this message as a subscriber of the <a href=3D"mailto:shar=
[email protected]">[email protected]</a> mailing list.</div>
<div>To unsubscribe: mailto:<a href=3D"mailto:[email protected]">sh=
[email protected]</a></div>
<div>For general help: mailto:<a href=3D"mailto:[email protected]">[email protected]=
g</a>?subject=3Dhelp</div>
<div>OW2 mailing lists service home page: <a href=3D"http://www.ow2.org/wws=
" target=3D"_blank">http://www.ow2.org/wws</a></div>
<div>=A0</div>
<div>=A0</div>
<div>=A0</div>

--00504502c8738c153a0475338432--

------------=_1254764036-18930-7268
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

------------=_1254764036-18930-7268--