10 Replies Latest reply on Jun 28, 2011 6:02 AM by Mitja Skuhala Branched from an earlier discussion.

    JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"

    Mitja Skuhala Newbie

      got the similar problem:

      So far I Deploy on jBoss 5.1 and it worked.

      Then I tried to jBoss 6.0-M5 and also worked.
      Now I want to Deploy in 6.0 Final version and it does not work

       

      ----------------------------------------------------------------------------------------------------------------------------------------------------------------

      [org.hibernate.cfg.SettingsFactory] Database ->

             name : IBM solidDB

          version : 6.5.0.3 Build 2010-10-04

            major : -1

            minor : -1

      11:42:54,463 INFO  [org.hibernate.cfg.SettingsFactory] Driver ->

             name : IBM solidDB JDBC driver 6.5.0.3 Build 2010-10-04

          version : 6.5.0.3 Build 2010-10-04

            major : 6

            minor : 5

      11:42:54,479 INFO  [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.SolidSQLDialect

      11:42:54,479 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=zzzz.ear/aaaa.jar#SdpPersistenceUnit state=Create: java.lang.NoSuchFieldError: STRING

      ----------------------------------------------------------------------------------------------------------------------------------------------------------------

      <persistence 

           xmlns="http://java.sun.com/xml/ns/persistence

           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance

           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd

           version="1.0">

        <persistence-unit name="SdpPersistenceUnit">

              <jta-data-source>java:/SolidDS</jta-data-source>

              <properties>

                  <property name="hibernate.default_catalog" value="xxxxx"/>

                  <property name="hibernate.default_schema" value="yyyyy"/>                               

                  <property name="hibernate.hbm2ddl.auto" value="update"/>

                  <property name="hibernate.dialect" value="org.hibernate.dialect.SolidSQLDialect"/>

                  <property name="hibernate.show_sql" value="true"/>

              </properties>

          </persistence-unit>

      </persistence>

        • 1. JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
          jaikiran pai Master

          smtraxi smtarx, welcome to the forums!

           

          I've branched your discussion to this separate thread because your post wasn't really related to the thread you originally posted in.

           

           

          smtraxi smtarx wrote:

           


           

          11:42:54,479 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=zzzz.ear/aaaa.jar#SdpPersistenceUnit state=Create: java.lang.NoSuchFieldError: STRING

          Can you also please post the entire exception stacktrace that you see on the console or server.log? That above method suggests a NoSuchFieldError which is causing the deployment to fail.

          • 2. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
            Mitja Skuhala Newbie

            2011-02-25 10:02:36,099 INFO  [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider] (HDScanner) Using provided datasource

            2011-02-25 10:02:36,333 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Database ->

                   name : IBM solidDB

                version : 6.5.0.3 Build 2010-10-04

                  major : -1

                  minor : -1

            2011-02-25 10:02:36,333 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Driver ->

                   name : IBM solidDB JDBC driver 6.5.0.3 Build 2010-10-04

                version : 6.5.0.3 Build 2010-10-04

                  major : 6

                  minor : 5

            2011-02-25 10:02:36,364 INFO  [org.hibernate.dialect.Dialect] (HDScanner) Using dialect: org.hibernate.dialect.SolidSQLDialect

             

            2011-02-25 10:02:36,364 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=persistence.unit:unitName=sdpcoreear.ear/#SdpPersistenceUnit state=Create: java.lang.NoSuchFieldError: STRING

                at org.hibernate.dialect.SolidSQLDialect.<init>(SolidSQLDialect.java:288) [:3.6.0.Final]

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_20]

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [:1.6.0_20]

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [:1.6.0_20]

                at java.lang.reflect.Constructor.newInstance(Unknown Source) [:1.6.0_20]

                at java.lang.Class.newInstance0(Unknown Source) [:1.6.0_20]

                at java.lang.Class.newInstance(Unknown Source) [:1.6.0_20]

                at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:156) [:3.6.0.Final]

                at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:99) [:3.6.0.Final]

                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:130) [:3.6.0.Final]

                at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2833) [:3.6.0.Final]

                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2829) [:3.6.0.Final]

                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1840) [:3.6.0.Final]

                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:902) [:3.6.0.Final]

                at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [:3.6.0.Final]

                at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-3]

                at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.0.0.Final]

                at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-3]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_20]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_20]

                at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_20]

                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]

                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]

                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.GA]

                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]

                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]

                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]

                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

                at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

                at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

                at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

                at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_20]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_20]

                at java.lang.Thread.run(Unknown Source) [:1.6.0_20]

            • 3. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
              jaikiran pai Master

              Where did you get the org.hibernate.dialect.SolidSQLDialect from? What does it's code look like?

              • 4. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
                kiran.kumar M Newbie

                jaikiran, seems SolidSQLDialect is from SolidDB from IBM

                http://www-01.ibm.com/software/data/soliddb/

                http://www-01.ibm.com/support/docview.wss?uid=swg21440246

                 

                 

                the line number SolidSQLDialect.java:288 reads as follows

                 

                registerFunction("str", new SQLFunctionTemplate(Hibernate.STRING, "cast(?1 as varchar)"));

                 

                --Kiran.Kumar

                • 5. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
                  jaikiran pai Master

                  kiran.kumar M wrote:

                   

                  jaikiran, seems SolidSQLDialect is from SolidDB from IBM

                  http://www-01.ibm.com/software/data/soliddb/

                  http://www-01.ibm.com/support/docview.wss?uid=swg21440246

                   

                  You're right.

                   

                   

                  kiran.kumar M wrote:

                   

                  registerFunction("str", new SQLFunctionTemplate(Hibernate.STRING, "cast(?1 as varchar)"));

                   

                  --Kiran.Kumar

                   

                  Looking at the Hibernate version shipped in AS 6.0.0.Final, it does have that field in org.hibernate.Hibernate class. Unless smtraxi smtarx is packaging his own version of Hibernate (which is missing this field), I don't see a reason why this exception should be thrown.

                  • 7. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
                    Viggo Navarsete Expert

                    Today I figured out what was wrong in my situation, a method signature in SQLFunction.java interface had changed between Hibernate 3.3.0.GA (which we previously used) and Hibernate 3.6.0.Final (which is bundled with JBoss 6.0.0.Final):

                     

                     

                    Hibernate 3.3.0.GA:

                    SQLFunction.java: public String render(List args, SessionFactoryImplementor factory) throws QueryException;

                     

                     

                    Hibernate 3.6.0.Final:

                    SQLFunction.java: public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException;

                     

                     

                    When I updated my custom function (which extended StandardSQLFunction and implemented SQLFunction) to use the new method signature everything started to work!!

                    • 8. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
                      Mitja Skuhala Newbie

                      The SolidSQLDialect was the problem, because the dialect wasn't for the hibernate in jboss 6.0 final. 

                       

                      Now we got the newest SolidSQLDialect and it works, although I have not been tested enough.

                      • 9. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
                        Dmitry Paykin Newbie

                        Hi,

                        I have exactly the same problem.

                        Can you please upload your modified dialect that works with Hibernate 3.6 or at least point to the source of original IBM's SolidSQLDialect dialect?

                        Thank you.

                        • 10. Re: JBoss AS6 - Persistence unit fails to deploy with error : "Create: java.lang.NoSuchFieldError: STRING"
                          Mitja Skuhala Newbie

                          Hi,

                           

                          I'cant upload SolidSQLDialect, sory. We used it in our Company and we get him from IBM. (IBM has developed this dialect only for us, at the moment)

                           

                          Try to contanct IBM, and ask them for newest Dialect.