-
1. Re: Load JDK resources in AS7
maksymg May 25, 2012 1:48 PM (in response to maksymg)Can someone help?
It only happens in domain configuration, standalone works fine.
Thanks,
-
2. Re: Load JDK resources in AS7
ctomc May 26, 2012 12:43 PM (in response to maksymg)hi,
did you try modifying jboss_home\modules\sun\jdk\main\module.xml to include this? does it work if you do?
--
tomaz
-
3. Re: Load JDK resources in AS7
maksymg May 29, 2012 3:00 PM (in response to ctomc)Tomaz,
That helped. But it leaves a bad design taste:
- Class loading works differently for standalone & domain modes
- I'm forced to modify internal JBoss modules
Better aproach would be to have a separate empty module which wil be loaded by sun.jdk module. That would give everyone a standard placeholder to add "optional" JDK staff without worring during JBoss upgrade.
Thanks a lot,
Maksym
-
4. Re: Load JDK resources in AS7
jaikiran May 30, 2012 2:36 AM (in response to maksymg)I wouldn't expect the classloading to behave differently for domain and standalone modes. Can you attach a simple application which reproduces this? Just out of curiosity - do all your hosts run on the same Java vendor and version? Also can you post the entire exception stacktrace and tell us where exactly this exception happens?
-
5. Re: Load JDK resources in AS7
maksymg Jun 1, 2012 6:37 PM (in response to jaikiran)It would be quite diffucult to build a sample application. Here is a full stack trace. It's originated by spring scheduler:
15:34:33,420 ERROR [com.docupace.dflow.image.impl.DbImageServiceImpl] (dflow-core-scheduler-1) Error on files purging: java.lang.NoClassDefFoundError: com/sun/rowset/CachedRowSetImpl
at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.newCachedRowSet(SqlRowSetResultSetExtractor.java:78) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.createSqlRowSet(SqlRowSetResultSetExtractor.java:62) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.extractData(SqlRowSetResultSetExtractor.java:46) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.extractData(SqlRowSetResultSetExtractor.java:1) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:445) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.queryForRowSet(JdbcTemplate.java:498) [spring-jdbc-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at com.docupace.dflow.image.impl.DbImageServiceImpl.purgeImages(DbImageServiceImpl.java:145) [dflow-core-support_classes.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_04]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_04]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_04]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_04]
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) [spring-core-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65) [spring-context-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51) [spring-context-3.0.4.RELEASE.jar:3.0.4.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_04]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) [rt.jar:1.7.0_04]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) [rt.jar:1.7.0_04]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_04]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]
-
6. Re: Load JDK resources in AS7
andyrooheavens Feb 26, 2013 1:44 AM (in response to jaikiran)Is there some solution to this that doesn't involve modifying modules?
Such as adding the resources.jar to jboss-deployment-structure.xml...
We run our app on a JBoss farm and it's always a pain to get them to modify the modules.
-
7. Re: Load JDK resources in AS7
jaikiran Feb 26, 2013 2:16 AM (in response to andyrooheavens)Andrew, welcome to the forums!
I'm not sure what exact issue you are running into. Can you please add some details including the AS7 version and the exception stacktrace(s) that you are seeing?
-
8. Re: Load JDK resources in AS7
nickarls Feb 26, 2013 2:41 AM (in response to andyrooheavens)So you are asking "Is there a way of including stuff from resources.jar in the same way as the system/paths does for rt.jar"?
-
9. Re: Load JDK resources in AS7
andyrooheavens Feb 26, 2013 2:44 AM (in response to jaikiran)Thanks Jaikiran,
JBoss: jboss-as-7.1.1.Final
JDK: jdk1.6.0_16
As per the original poster, without modifying any modules i got rid of the initial error: java.lang.NoClassDefFoundError: com/sun/rowset/CachedRowSetImpl
Did this by modifying the jboss-deployment-structure.xml file as follows:
<jboss-deployment-structure>
<deployment>
<dependencies>
<system>
<paths>
<path name="com/sun/rowset" />
<path name="com/sun/rowset/internal" />
<path name="com/sun/rowset/providers" />
</paths>
</system>
</dependencies>
</deployment>
</jboss-deployment-structure>
But then i get the resource bundle missing error:
java.util.MissingResourceException: Can't find bundle for base name com/sun/rowset/RowSetResourceBundle, locale en_AU, stacktrace=java.util.MissingResourceException: Can't find bundle for base name com/sun/rowset/RowSetResourceBundle, locale en_AU
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:962)
at com.sun.rowset.JdbcRowSetResourceBundle.<init>(JdbcRowSetResourceBundle.java:88)
at com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(JdbcRowSetResourceBundle.java:107)
at com.sun.rowset.CachedRowSetImpl.<init>(CachedRowSetImpl.java:335)
at org.springframework.jdbc.core.SqlRowSetResultSetExtractor.newCachedRowSet(SqlRowSetResultSetExtractor.java:78)...
So, without modifying any modules or generally external to my EAR file, i would like to be able to fix this error.
-
10. Re: Load JDK resources in AS7
andyrooheavens Feb 26, 2013 2:47 AM (in response to nickarls)Hi Nicklas,
Yes this could somehow be the solution i guess.
I don't want to have to manually load the bundle file into my EAR since that would lead to mismatched versions (between bundle and jars) if they changed the underlying JRE in the farm servers.
-
11. Re: Load JDK resources in AS7
andyrooheavens Mar 7, 2013 5:19 PM (in response to andyrooheavens)Well, eventually i discarded the common library code that was using the Spring SqlRowSet class and rewrote it (minor change) using the RowMapper pattern.
This removed the issues of using com.sun.rowset classes altogether
This removes some of the caching ability of the class but then again i have caching at other levels.
Still, it would be nice to be able to resolve other issues like this that may arise.