[Beginner's Corner] - Including external/third-party JARs in app on JBoss 7.1.1
by mbpolan
mbpolan [https://community.jboss.org/people/mbpolan] created the discussion
"Including external/third-party JARs in app on JBoss 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/824196#824196
--------------------------------------------------------------
Hi everyone,
I'm a bit of a newbie when it comes to JBoss, so please correct me if I misunderstood something.
Anyway, I'm attempting to port an existing webapp from Tomcat 7 to a new JBoss 7.1.1 instance, and I'm a bit confused about getting all of my JAR dependencies resolved. There exists a collection of JAR files that are externally supplied by a third-party, and let's say they are located under $JAVA_HOME/lib/other on the end-user's machine. My webapp needs these JARs to be available, and so far, it seems that making a module for them is the way to go. However, I don't want to copy these JAR files to the module directory, because depending on what version of the JARs the user has (and their Java version), there could be differences in the code contained in those files. In Tomcat, I would just make sure that the aforementioned path was added to the classpath before my webapp was deployed, and everything would be loaded correctly. Is this kind of approach possible to do in JBoss?
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/824196#824196]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss Tools] - Touble using the Hibernate Tools in Eclipse
by Ankit Pawar
Ankit Pawar [https://community.jboss.org/people/ankit.pawar] created the discussion
"Touble using the Hibernate Tools in Eclipse"
To view the discussion, visit: https://community.jboss.org/message/824924#824924
--------------------------------------------------------------
hello,
I am using hibernate tools plugin in Eclipse for generating code for beans and dao classes automatically. I am doing so because there are so many tables in the database so it is better than doing it manually. After giving the hibernate.cfg.xml and the connection properties, and while connecting, it gives exception.
I was trying to connect to Oracle 10g express edition DB, checked all the parameters and connection properties, all is going right.
I am not understanding why it is giving the exception.
The whole stackTrace is as below :-
2013-06-25 16:23:29,816 WARN main org.hibernate.impl.SessionFactoryObjectFactory - Could not unbind factory from JNDI
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at org.hibernate.impl.SessionFactoryObjectFactory.removeInstance(SessionFactoryObjectFactory.java:139)
at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:981)
at org.jboss.tools.hibernate3_5.HibernateExtension3_5.closeSessionFactory(HibernateExtension3_5.java:122)
at org.jboss.tools.hibernate3_5.HibernateExtension3_5.reset(HibernateExtension3_5.java:214)
at org.hibernate.console.ConsoleConfiguration.reset(ConsoleConfiguration.java:123)
at org.hibernate.eclipse.console.views.ReloadConfigurationAction.doRun(ReloadConfigurationAction.java:34)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:65)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
2013-06-25 16:23:29,819 WARN main org.hibernate.impl.SessionFactoryObjectFactory - Could not unbind factory from JNDI
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.unbind(InitialContext.java:416)
at org.hibernate.impl.SessionFactoryObjectFactory.removeInstance(SessionFactoryObjectFactory.java:139)
at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:981)
at org.hibernate.console.ConsoleConfiguration.closeSessionFactory(ConsoleConfiguration.java:417)
at org.hibernate.console.ConsoleConfiguration.reset(ConsoleConfiguration.java:130)
at org.hibernate.eclipse.console.views.ReloadConfigurationAction.doRun(ReloadConfigurationAction.java:34)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:65)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Please help me.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/824924#824924]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months