You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Adnan Atic <Ad...@hilton.com> on 2007/06/14 20:53:20 UTC

Ibatis & Java Web Start

Hi,
 I am trying to distribute an app via java web start, but am having
difficulties with JWS not parsing my sql config files properly. I use
Ibatis2 with ibatis DAO Framework. 
Right before I load my dao.xml config file I set default class loader :

		Resources.setDefaultClassLoader(
MyClass.class.getClassLoader() );
		Reader reader =
Resources.getResourceAsReader("dao.xml");
		daoManager = DaoManagerBuilder.buildDaoManager(reader);

When I try to run it from jws I get this error:

SEVERE: com.ibatis.dao.client.DaoException: Error while configuring
DaoManager.  Cause: java.lang.RuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: java.lang.RuntimeException: Error parsing XPath
'/sqlMap/resultMap/result'.  Cause:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)

Does anyone know if it is even possible to use ibatis dao framework from
java web start?

Thanks


Re: Ibatis & Java Web Start

Posted by Brandon Goodin <br...@gmail.com>.
Anytime, just let your professional friends know about me. I'm available to
hire for a reasonable consulting fee :)

Brandon Goodin

On 6/14/07, Adnan Atic <Ad...@hilton.com> wrote:
>
>  That was the problem.
> I had :
> <security>
>   <j2ee-application-client-permissions/>
> </security>
>
> which apparently wasn't enough. After I changed it to <all-permissions> it
> worked fine.
>
>
> Thanks!
>
>  ------------------------------
> *From:* Brandon Goodin [mailto:brandon.goodin@gmail.com]
> *Sent:* Thursday, June 14, 2007 2:03 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Ibatis & Java Web Start
>
> Greetings Adnan,
>
> It may be an issue with how you have JavaWebStart configured. It sounds to
> me as though you do not have your security permissions configured correctly.
> Be sure you have the following security configuration in your jnlp file.
> ...
>   <security>
>       <all-permissions/>
>   </security>
> ...
>
> Brandon
>
> On 6/14/07, Adnan Atic < Adnan_Atic@hilton.com> wrote:
> >
> > Hi,
> > I am trying to distribute an app via java web start, but am having
> > difficulties with JWS not parsing my sql config files properly. I use
> > Ibatis2 with ibatis DAO Framework.
> > Right before I load my dao.xml config file I set default class loader :
> >
> >                 Resources.setDefaultClassLoader (
> > MyClass.class.getClassLoader() );
> >                 Reader reader =
> > Resources.getResourceAsReader("dao.xml");
> >                 daoManager = DaoManagerBuilder.buildDaoManager(reader);
> >
> > When I try to run it from jws I get this error:
> >
> > SEVERE: com.ibatis.dao.client.DaoException: Error while configuring
> > DaoManager.  Cause: java.lang.RuntimeException: Error occurred.  Cause:
> > com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> > java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
> > Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
> > Cause: java.lang.RuntimeException: Error parsing XPath
> > '/sqlMap/resultMap/result'.  Cause:
> > java.security.AccessControlException: access denied
> > (java.lang.RuntimePermission accessDeclaredMembers)
> >
> > Does anyone know if it is even possible to use ibatis dao framework from
> > java web start?
> >
> > Thanks
> >
> >
>

RE: Ibatis & Java Web Start

Posted by Adnan Atic <Ad...@hilton.com>.
That was the problem.
I had :
<security>
  <j2ee-application-client-permissions/>
</security>
 
which apparently wasn't enough. After I changed it to <all-permissions>
it worked fine.
 
 
Thanks!

________________________________

From: Brandon Goodin [mailto:brandon.goodin@gmail.com] 
Sent: Thursday, June 14, 2007 2:03 PM
To: user-java@ibatis.apache.org
Subject: Re: Ibatis & Java Web Start


Greetings Adnan,

It may be an issue with how you have JavaWebStart configured. It sounds
to me as though you do not have your security permissions configured
correctly. Be sure you have the following security configuration in your
jnlp file. 
...
  <security>
      <all-permissions/>
  </security>
...

Brandon


On 6/14/07, Adnan Atic < Adnan_Atic@hilton.com
<ma...@hilton.com> > wrote: 

	Hi,
	I am trying to distribute an app via java web start, but am
having 
	difficulties with JWS not parsing my sql config files properly.
I use
	Ibatis2 with ibatis DAO Framework.
	Right before I load my dao.xml config file I set default class
loader :
	
	                Resources.setDefaultClassLoader (
	MyClass.class.getClassLoader() );
	                Reader reader =
	Resources.getResourceAsReader("dao.xml");
	                daoManager =
DaoManagerBuilder.buildDaoManager(reader);
	
	When I try to run it from jws I get this error: 
	
	SEVERE: com.ibatis.dao.client.DaoException: Error while
configuring
	DaoManager.  Cause: java.lang.RuntimeException: Error occurred.
Cause:
	com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause:
	java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/sqlMap'.
	Cause: com.ibatis.common.xml.NodeletException: Error parsing
XML.
	Cause: java.lang.RuntimeException: Error parsing XPath
	'/sqlMap/resultMap/result'.  Cause: 
	java.security.AccessControlException: access denied
	(java.lang.RuntimePermission accessDeclaredMembers)
	
	Does anyone know if it is even possible to use ibatis dao
framework from
	java web start?
	
	Thanks 
	
	



Re: Ibatis & Java Web Start

Posted by Brandon Goodin <br...@gmail.com>.
Greetings Adnan,

It may be an issue with how you have JavaWebStart configured. It sounds to
me as though you do not have your security permissions configured correctly.
Be sure you have the following security configuration in your jnlp file.
...
  <security>
      <all-permissions/>
  </security>
...

Brandon

On 6/14/07, Adnan Atic <Ad...@hilton.com> wrote:
>
> Hi,
> I am trying to distribute an app via java web start, but am having
> difficulties with JWS not parsing my sql config files properly. I use
> Ibatis2 with ibatis DAO Framework.
> Right before I load my dao.xml config file I set default class loader :
>
>                 Resources.setDefaultClassLoader(
> MyClass.class.getClassLoader() );
>                 Reader reader =
> Resources.getResourceAsReader("dao.xml");
>                 daoManager = DaoManagerBuilder.buildDaoManager(reader);
>
> When I try to run it from jws I get this error:
>
> SEVERE: com.ibatis.dao.client.DaoException: Error while configuring
> DaoManager.  Cause: java.lang.RuntimeException: Error occurred.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause: java.lang.RuntimeException: Error parsing XPath
> '/sqlMap/resultMap/result'.  Cause:
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission accessDeclaredMembers)
>
> Does anyone know if it is even possible to use ibatis dao framework from
> java web start?
>
> Thanks
>
>