[ https://issues.apache.org/jira/browse/JUDDI-999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994735#comment-16994735 ]
Rahul S commented on JUDDI-999: ------------------------------- Thanks [~spyhunter99] for your input. We cannot create table manually as we have multi-client and dynamic deployment kind of product. And how can we ensure that manually creating table will work in every case? >> "Just replace varchar(8192) with varchar(max)" How can we do this in "TmodelInstanceInfo.java" class? Below is the snippet from this class where we specifies the column length. {code:java} @Column(name = "instance_parms", length = 8192) public String getInstanceParms() { return this.instanceParms; } public void setInstanceParms(String instanceParms) { this.instanceParms = instanceParms; }{code} This seems a problem of compatibility with SQLServer. We are supporting various versions of SQLServer from 12 to latest. Please let me know if you could elaborate your solution a little. Or if you have could think of some alternative. Thanks, Rahul > Issue with SQL Server Database with JUDDI 3.3.6 : The size (8192) given to > the column 'instance_parms' exceeds the maximum allowed for any data type > (8000) > ----------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: JUDDI-999 > URL: https://issues.apache.org/jira/browse/JUDDI-999 > Project: jUDDI > Issue Type: Bug > Components: juddi-tomcat > Affects Versions: 3.3.6 > Reporter: Rahul S > Priority: Major > Labels: jUDDI, juddi > > We were using SQLServer with JUDDI 3.0.4. It is working fine so far. > Now, we are trying to move to JUDDI version 3.3.6. We are encountering > following issue on start-up. > {code:java} > Caused by: <openjpa-2.3.0-r422266:1540826 nonfatal general error> > org.apache.openjpa.persistence.PersistenceException: The size (8192) given to > the column 'instance_parms' exceeds the maximum allowed for any data type > (8000). {stmnt 1090863652 CREATE TABLE j3_tmodel_instance_info (id BIGINT NOT > NULL, instance_parms VARCHAR(8192), tmodel_key VARCHAR(255) NOT NULL, > entity_key VARCHAR(255) NOT NULL, PRIMARY KEY (id))} [code=131, > state=S0002]Caused by: <openjpa-2.3.0-r422266:1540826 nonfatal general error> > org.apache.openjpa.persistence.PersistenceException: The size (8192) given to > the column 'instance_parms' exceeds the maximum allowed for any data type > (8000). {stmnt 1090863652 CREATE TABLE j3_tmodel_instance_info (id BIGINT NOT > NULL, instance_parms VARCHAR(8192), tmodel_key VARCHAR(255) NOT NULL, > entity_key VARCHAR(255) NOT NULL, PRIMARY KEY (id))} [code=131, state=S0002] > at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:559) at > org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:455) at > org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:160) > at > org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:164) > at > org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:122) > at > org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:209) > at > org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:155) > at > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226) > at > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:153) > at > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59) > at > org.apache.juddi.config.PersistenceManager.getEntityManager(PersistenceManager.java:48) > at > org.apache.juddi.config.AppConfig.getPersistentConfiguration(AppConfig.java:174) > at org.apache.juddi.config.AppConfig.loadConfiguration(AppConfig.java:160) > at org.apache.juddi.config.AppConfig.<init>(AppConfig.java:82) at > org.apache.juddi.config.AppConfig.getInstance(AppConfig.java:272) at > org.apache.juddi.config.AppConfig.getConfiguration(AppConfig.java:298) at > org.apache.juddi.api.impl.AuthenticatedService.<init>(AuthenticatedService.java:75) > at org.apache.juddi.api.impl.UDDIInquiryImpl.<init>(UDDIInquiryImpl.java:88) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at > sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at > java.lang.reflect.Constructor.newInstance(Unknown Source) at > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142) ... > 36 moreCaused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: The size > (8192) given to the column 'instance_parms' exceeds the maximum allowed for > any data type (8000). {stmnt 1090863652 CREATE TABLE j3_tmodel_instance_info > (id BIGINT NOT NULL, instance_parms VARCHAR(8192), tmodel_key VARCHAR(255) > NOT NULL, entity_key VARCHAR(255) NOT NULL, PRIMARY KEY (id))} [code=131, > state=S0002] at > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219) > at > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:203) > at > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:59) > at > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConnectionDecorator.java:914) > at > org.apache.openjpa.lib.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.java:118) > at > org.apache.openjpa.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1231) at > org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:976) at > org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:552) at > org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:364) at > org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:341) at > org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:505) ... 58 > more > {code} > > The error is "*{color:#de350b}The size (8192) given to the column > 'instance_parms' exceeds the maximum allowed for any data type (8000){color}*" > Eventually the table "j3_tmodel_instance_info" failed to create. We are using > SQLServer version 12.0.5207.0. It poses a limit on varchar fields to 8000. > We have tried modifying the column length in class "TmodelInstanceInfo" and > redeploying the app, however then it starts giving other issue. > {noformat} > The type "class org.apache.juddi.model.TmodelInstanceInfo" has not been > enhanced.{noformat} > > Could anyone please help us. We are in RED flag and our application cease to > work after update to JUDDI 3.3.6 > Any help be greatly appreciated. Kindly let me know if I need to provide more > information to assist investigation. > Thanks a lot > -- This message was sent by Atlassian Jira (v8.3.4#803005)