0
我使用的是HSQLDB + Glassfish + JPA + SpringMVC。我完成了JNDI映射,創建了連接池並將我的HSQLDB.jar(2.2.4)放入了Glassfish lib文件夾。字符串索引超出範圍:-1查找JPA方法
我能夠成功部署應用程序。當我使用「localhost:8080/site」訪問應用程序時,它會在find方法(Hibernate)上引發以下錯誤,如下所示。
請幫忙解決這個問題。
INFO: [ERROR] 12:23:21 Ejb3Configuration - Container is providing a null PersistenceUnitRootUrl: discovery impossible
INFO: [ WARN] 12:23:21 Ejb3Configuration - hibernate.connection.autocommit = false break the EJB3 specification
INFO: PWC1412: WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'mycompany'
INFO: [ WARN] 12:23:24 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
INFO: WEB0671: Loading application [com.mycompany_site_war_1.0] at [/site]
INFO: com.mycompany_site_war_1.0 was successfully deployed in 206,384 milliseconds.
WARNING: StandardWrapperValve[mycompany]: PWC1406: Servlet.service() for servlet mycompany threw exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1952)
at java.lang.String.substring(String.java:1925)
at org.*******.core.catalog.dao.ProductDaoImpl.findProductByURI(ProductDaoImpl.java:392)
at org.*******.core.catalog.service.CatalogServiceImpl.findProductByURI(CatalogServiceImpl.java:268)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
這是一個持久性問題或其他....?
如果是持久性問題需要檢查什麼....?
看起來像一個配置問題 – SJuan76
請問,你可以包含一些'org。*******'代碼嗎? – sinuhepop